import {getAccessToken, uploadWechatImg} from '@/api/commonApi'
const common = {
    namespaced: true,

    state: {
        access_token: '',
    },
    getters: {
      
    },
    mutations: { 
    },
    actions: { 
        async getAccessToken ({state}) {
            
            if (state.access_token) {
                return state.access_token
            }
            var res = await getAccessToken()
            res = JSON.parse(res)
            state.access_token = res.Data.accessToken
            return  state.access_token
        }
    }
}
export default common